import request from '@/utils/request'

//获取稳定性列表
export function stabilityList(data) {
    return request({
        url: '/stability-scheme/list',
        method: 'post',
        data
    })
}

//提交审批
export function subApproval(id) {
    return request({
        url: `/stability-scheme/submit?id=${id}`,
        method: 'put',
    })
}

//审批
export function approval(data) {
    return request({
        url: `/stability-scheme/approval`,
        method: 'put',
        data
    })
}

//删除
export function staDelete(id) {
    return request({
        url: `/stability-scheme/delete?id=${id}`,
        method: 'delete',
    })
}

//获取项目列表-全部
export function projectList() {
    return request({
        url: '/project-start/project/list-ongoing',
        method: 'GET',
    })
}

//样品下拉
export function sampleDown() {
    return request({
        url: '/stability-base/sampleType/downList',
        method: 'GET',
    })
}

//设置考察类型
export function Investigation() {
    return request({
        url: '/stability-base/inspect-type/down/list',
        method: 'GET',
    })
}

//放置条件
export function placeConditions(id) {
    return request({
        url: `/stability-base/place-conditions/down/list?id=${id}`,
        method: 'GET',
    })
}

//获取样品烈性

export function projectId(id) {
    return request({
        url: `/stability-base/sampleType/project?id=${id}`,
        method: 'GET',
    })
}

//稳定性方案明细--保存
export function createSave(data) {
    return request({
        url: `/stability-scheme/create`,
        method: 'post',
        data
    })
}

//稳定性方案明细--草稿保存修改
export function updateSave(data) {
    return request({
        url: `/stability-scheme/update`,
        method: 'put',
        data
    })
}

//稳定性方案明细--方案变更的保存修改
export function updateChangeSave(data) {
    return request({
        url: `/stability-scheme/update-change `,
        method: 'put',
        data
    })
}


//稳定性编辑
export function stabilityEditor(id) {
    return request({
        url: `/stability-scheme/detail?id=${id}`,
        method: 'GET',
    })
}

//稳定性详情
export function stabilityDetail(id) {
    return request({
        url: `/stability-scheme/flow?id=${id}`,
        method: 'GET',
    })
}

//获取所有项目
export function downListProject() {
    return request({
        url: `/stability-base/inspectProject/downList`,
        method: 'GET',
    })
}


//稳定性----方案变更提交
export function submitChange(data) {
    return request({
        url: `/stability-scheme/submit-change`,
        method: 'put',
        data
    })
}

//稳定性----仪器
export function instrument(data) {
    return request({
        url: `/check/yi-yao/instrument/list`,
        method: 'post',
        data
    })
}

///稳定性----变更验证取样点是否小于已取样
export function pointList(data) {
    return request({
        url: `/stability-plan/if-add-point `,
        method: 'post',
        data
    })
}